import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [

    {
        path: '/',
        name: 'Index',
        component: () =>
            import ('../views/index/index.vue')
    },


    {
        path: '/login',
        name: 'Login',
        component: () =>
            import ('../views/Login/Login.vue')
    },
    {
        path: '/main',
        name: 'Main',
        component: () =>
            import ('../views/Main.vue'),
        children: [
            //法条资源
            {
                path: '/resource',
                name: 'Resource',
                component: () =>
                    import ('../views/resource/Resource.vue')

            },
            {
                path: "/resource_details",
                name: "ResourceDetails",
                component: () =>
                    import ('../views/resource/ResourceDetails.vue')

            },
            //案例学习
            {
                path: '/learn',
                name: 'Learn',
                component: () =>
                    import ('../views/learn/Learn.vue')
            },
            //案例学习列表
            {
                path: '/learn_list',
                name: "LearnList",
                component: () =>
                    import ('../views/learn/LearnList.vue')

            },
            {
                path: "/analyse_list",
                name: "AnalyseList",
                component: () =>
                    import ("../views/analyse/AnalyseList.vue")

            },
            //案情分析
            {
                path: '/analyse',
                name: 'Analyse',
                component: () =>
                    import ('../views/analyse/Analyse.vue')
            },
            //焦点讨论
            {
                path: '/discuss',
                name: 'Discuss',
                component: () =>
                    import ('../views/discuss/Discuss.vue')
            },
            //评论模块
            {
                path: '/comment',
                name: 'Comment',
                component: () =>
                    import ("../views/discuss/Comment.vue")
            },
            //工具
            {
                path: '/tools',
                name: 'Tools',
                component: () =>
                    import ('../views/tools/Tools.vue')


            },
            //个人中心
            {
                path: '/user',
                name: 'User',
                component: () =>
                    import ('../views/user/User.vue')

            }








        ]
    },








]

const router = new VueRouter({
    routes
})

export default router